package spms.front.util;

public class Ajax {

    private boolean status = true;
    private String message;
    private Object data;
    private Throwable exception;

    public Ajax() {
    }

    public Ajax(boolean status) {
        this(status, null, null, null);
    }

    public Ajax(boolean status, String message) {
        this(status, message, null, null);
    }

    public Ajax(boolean status, String message, Throwable exception) {
        this(status, message, null, exception);
    }

    public Ajax(boolean status, String message, Object data, Throwable exception) {
        this.status = status;
        this.message = message;
        this.data = data;
        this.exception = exception;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Throwable getException() {
        return exception;
    }

    public void setException(Throwable exception) {
        this.exception = exception;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Ajax [status=" + status + ", message=" + message + ", exception=" + exception + ", data=" + data + "]";
    }
}
